FROM python:3.9-slim

WORKDIR /app

# 安装系统依赖：gcc编译器和LDAP开发库
RUN apt-get update && apt-get install -y --no-install-recommends \
    gcc \
    libldap2-dev \
    libsasl2-dev \
    && rm -rf /var/lib/apt/lists/*

# 安装Python依赖
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# 复制代理代码
COPY proxy.py .

# 启动命令
CMD ["python", "proxy.py"]
